package com.bing.common.model;


import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;

import java.io.Serializable;

/**
 * XLS通用提示类
 */
public class XlsCommonTips implements Serializable {

    private static final long serialVersionUID = 1L;
    // 行提示
    private String rowTips;
    // 是否有提示
    private Boolean hasTips = Boolean.FALSE;
    // 用于拼接错误提示
    private StringBuilder sb;

    public Boolean getHasTips() {
        return hasTips;
    }

    public String getRowTips() {
        return rowTips;
    }

    public void setRowTips(String rowTips) {
        if(StrUtil.isBlank(rowTips)){
            return;
        }
        if(ObjectUtil.isNull(sb)){
            sb = new StringBuilder();
            hasTips = true;
        }
        sb.append(rowTips).append("\n");
        this.rowTips = sb.toString();
    }
}
